let nums = [100, 200, 300]

// let [n0, n1] = nums
//let n0 = nums[0]
//let n1 = nums[1]

let [...newArr] = nums
// let newArr = []
// newArr[0] = nums[0]
// newArr[1] = nums[1]
// newArr[2] = nums[2]


let [nn0, ...others] = nums
console.log('nn0', nn0);
console.log('others', others);


//字符串 展开
let name = 'jshand'
let newArray = [...name]
console.log("newArray", newArray);


